home *** CD-ROM | disk | FTP | other *** search
- property pDeviantTarget, spriteNum
- global pgProvinceCode, itemListRow, immutableItems, mutableItems
-
- on getPropertyDescriptionList
- description = [:]
- addProp(description, #pDeviantTarget, [#default: EMPTY, #format: #string, #comment: "Not In List Target:"])
- return description
- end
-
- on doListSelect
- unfound = "TRUE"
- repeat with i = 1 to immutableItems.count
- if immutableItems[i].ItemName = sprite(spriteNum).member.text then
- doFillInvoiceItem(immutableItems[i])
- reCalcInvoice()
- unfound = "FALSE"
- exit repeat
- end if
- end repeat
- if unfound = "TRUE" then
- repeat with i = 1 to mutableItems.count
- if mutableItems[i].ItemName = sprite(spriteNum).member.text then
- doFillInvoiceItem(mutableItems[i])
- reCalcInvoice()
- unfound = "FALSE"
- exit repeat
- end if
- end repeat
- end if
- if (unfound <> "FALSE") and (sprite(spriteNum).member.text <> EMPTY) then
- go(pDeviantTarget)
- end if
- end
-
- on doFillInvoiceItem corpse
- member("field:Desc" & string(itemListRow)).text = corpse.Desc2
- member("field:Rate" & string(itemListRow)).text = string(corpse.Money2)
- tQty = value(member("field:Qty" & string(itemListRow)).text)
- if tQty < 1 then
- tQty = 1
- end if
- t = value(corpse.Money2) * tQty
- member("field:Amount" & string(itemListRow)).text = string(t)
- ttx = corpse.Tax2
- case pgProvinceCode of
- "AB", "NU", "NT", "YT", "--":
- if ttx = "S" then
- ttx = "G"
- end if
- end case
- member("field:Tax" & string(itemListRow)).text = ttx
- end
-